package edu.sctu.jsoup.entity;

import org.hibernate.annotations.Source;
import org.hibernate.annotations.Type;
import org.jsoup.nodes.Document;
import org.w3c.dom.Node;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.xml.transform.Result;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import java.io.StringWriter;
import java.io.Writer;
import java.sql.Blob;
import java.text.SimpleDateFormat;
import java.util.Date;


@Entity
public class Module3Entity {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)

    private Long id;

    @Type(type = "text")//可以存更长的数据
    private String html_content;

    private String html_url;
    private String create_time;



    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getHtml_content() {
        return html_content;
    }

    public void setHtml_content(String html_content) {
        this.html_content = html_content;
    }

    public String getHtml_url() {
        return html_url;
    }

    public void setHtml_url(String html_url) {
        this.html_url = html_url;
    }

    public String getCreate_time() {

        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        String create_time = df.format(new Date());
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }
}
